<template>
  <div class="list_content">
    <div @click="goHouseDetails(item.id)" :key="item.id" v-for="item in houseListData">
      <img v-if="item.file" :src="item.file.save_path" alt="">
      <!--<img v-if="item.file" :src="'http://kf.wuyoufang.cn' + '/upload/premises/20180808/247a80b0e7686844e00ab0dafff823db.jpg'" alt="">-->
      <!--<img v-else src="https://av.wuyoufang.com/assets/img/logo.jpg" alt="">-->
      <div class="building_list_content">
        <div v-if="item.name" class="title">{{item.name}}</div>
        <div v-if="item.Pname" class="title">{{item.Pname}}</div>
        <div class="content">
          <div class="left">
            <!--<span class="iconfont icon-ditu"></span>-->
            <span v-if="item.area" class="city">{{item.area.region_name_c}}</span>
            <span>-</span>
            <span class="building_name">{{item.name}}</span>
          </div>
          <div class="money_pay" v-if="item.sell">
            <span>{{item.sell}}</span>元/月
          </div>
          <div class="money_pay" v-else>
            <span>价格面议</span>
          </div>
        </div>
        <div class="housing">
          <div class="left">
            <span>{{item.ht_room_num}}室{{item.ht_office_num}}厅</span>
            <span v-if="item.floor !== null">{{item.floor.title}}/{{item.all_floor}}层</span>
            <span>{{item.acreage}}㎡</span>
          </div>
          <div class="acreage">
            <!--<span>13923</span>/㎡-->
          </div>
        </div>
        <div class="label">
          <span v-if="item.labels" v-for="label in item.labels" class="">{{label}}</span>
          <span v-if="item.label" v-for="labelTwo in item.label" class="">{{labelTwo}}</span>
          <!--<span v-if="item.premises" v-for="label in item.premises.labels" >{{label}}</span>-->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'RentingList',
    props:{
      // pushName:{
      //   type:String
      // },
      houseListData:{
        type:Array
      }
    },
    data(){
      return{
        listContentFixed:false
      }
    },
    methods:{
      goHouseDetails(id){
        this.$router.push({name:'RentingHouseDetails',params:{id:id}})
      },
    },

  }
</script>

<style scoped>
  .list_content {
    font-size: 1rem;
  }

  .list_content > div {
    border-top: 1px solid #eeeeee;
    padding: 10px;
    height: 5.5rem;
    display: flex;
  }

  .list_content img {
    height: 5.5rem;
    width: 6rem;
  }

  .list_content > div:nth-child(1) {
    border: none;
  }

  .list_content .building_list_content {
    flex: 1;
    margin-left: 10px;
    position: relative;
  }

  .list_content .building_list_content .title {
    /*font-size: 1.2rem;*/
    color: #333;
  }

  .list_content .building_list_content .content {
    height: 1.2rem;
    /*line-height: 1.2rem;*/
    display: flex;
    justify-content: space-between;
  }

  .list_content .building_list_content .content .left {
    font-size: 0.8rem;
    color: #999;
  }

  .list_content .building_list_content .content .icon-ditu {
    color: #e6191e;
    font-size: 0.8rem;
  }

  .building_list_content .content .money_pay {
    color: #e6191e;
    font-weight: bold;
  }

  .list_content .building_list_content .housing {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.8rem;
  }

  .list_content .building_list_content .label {
    position: absolute;
    bottom: 1px;
    left: 0;
  }

  .list_content .building_list_content .label > span {
    padding: 3px 5px;
    font-size: 0.8rem;
    margin-right: 10px;
  }

  .list_content .building_list_content .label > span:nth-child(1) {
    background-color: #ffebea;
    color: #e6191e;
  }

  .list_content .building_list_content .label > span:nth-child(2) {
    background-color: #dff1fd;
    color: #42abff;
  }

  .list_content .building_list_content .label > span:nth-child(3) {
    background-color: #fde9dd;
    color: #fa6609;
  }
  .list_content .building_look_more>div{
    margin: 0 auto;
    height: 3rem;
    width: 10rem;
    line-height: 3rem;
    text-align: center;
    color: #b9b8b8;
    background-color: #f8f8f8;
  }

</style>
